use kvDB::{db,options::options};

fn main() {
    let opts = options::default();
    let engine = db::Engine::open(opts).expect("failed to open kvDB engine");

    let res1 = engine.put("name".as_bytes().to_vec(), "hedong".as_bytes().to_vec());
    assert!(res1.is_ok());

    let res2 = engine.get("name".as_bytes().to_vec());
    println!("res2:{}",String::from_utf8_lossy(&res2.unwrap()));

    let res3 = engine.delete("name".as_bytes().to_vec());
    assert!(res3.is_ok());

    let res4 = engine.get("name".as_bytes().to_vec());
    assert!(res4.is_err());

}